package com.zhidisoft.crm.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.zhidisoft.crm.entity.customer;

public interface CustomerPoolMapper {

	//Oracle
	@Select("SELECT * FROM(SELECT A.*,ROWNUM RN "
			+ "FROM (SELECT customer_name,customer_industry_id,score,address_info,create_user_id,create_time,update_time FROM CUSTOMER where charge_user_id=null) A "
			+ "WHERE ROWNUM<=#{endIndex}) TL WHERE RN >#{startIndex}")
	public List<customer> pageList(int beginIndex, int endIndex);
	
	@Select("select count(id) from 	CUSTOMER")
	public int totalCount();
	
}
